ERROR Statement ---------------------------------------------------------------------------- Action Simulates the occurrence of a BASIC error or a user-defined error. Syntax ERROR integerexpression% Remarks The argument integerexpression% represents the error code. It must be between 1 and 255, inclusive. If integerexpression% is an error code already used by BASIC, the ERROR statement simulates the occurrence of that error. To define your own error code, use a value that is greater than any used by the standard BASIC error codes. (Start at 255 and work down to avoid compromising compatibility with future Microsoft BASIC error codes.) In general, the error codes used by BASIC are between 1 and 100 (although not all these are used). If an error statement is executed when no error-handling routine is enabled, BASIC generates an error message and stops program execution. If the ERROR statement specified an error code that is not used by BASIC, the message Unprintable error is generated. See Also ERR, ERL; ON ERROR; RESUME Example See the ON ERROR statement programming example, which uses the ERROR statement.